<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php session_start();
$newip = $_SERVER['REMOTE_ADDR'];
$Employee=$_SESSION['Username'];
$coup=$_SESSION['Coupon'];


if(!isset($Employee)||empty($Employee)||$newip!= $_SESSION['IP'])
{echo "If you are payday loan applicant, please start your ". "<a href='apply.php'>application here</a> now, thank you for your cooperation!";
exit();
}

//The following part is to set up interactive function between user and server
$status = $provinceID = $reason=$approvedloan=null; //declare vars

$conn = mysql_connect('cash2uca.ipagemysql.com', 'cash2uca', 'actW3740!@#$'); 
	if (!$conn) { 
	    die('Could not connect: ' . mysql_error()); 
		} 

mysql_select_db(cash2uca);

if(isset($_POST["mstatus"]) && is_numeric($_POST["mstatus"]))
{
    $status = $_POST["mstatus"];
}

if(isset($_POST["provinceID"]) && is_numeric($_POST["provinceID"]))
{
    $provinceID = $_POST["provinceID"];
}

?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Cash2u.ca: Payday loan online processing</title>
<META NAME="Keywords" CONTENT="How it works, payday loans,cash advance, payday loan, pay day loans, payday cash advance, online, unsecured loans, no fax payday loans, payday advance, payday cash loan, payday loans, cash advance, paycheque loans, short term,fast cash, unsecured personal loans, pay day loan, no fax loans, no faxing payday loans, no fax cash advance, faxless payday loans, short term loans, unsecured personal loan, unsecured loan, online loans, quick cash, no fax payday loan, payday cash advance, cash advance, online loan, fast cash loans, signature loan, no fax pay day loans, pay day advance, payday loans no faxing required, payday loan online, no faxing cash advance, payday loans no faxing, canada, money mart, money here, quick cash,check,cashing,easy,tax, bill,payment,currency,card,credit,Easy Cash Advances,Internet Payday loans, Payroll Advance, Payday Loan Services,Online Payday Advances, Online Payday Loan Provider, Pay Day">
<META NAME="Description" CONTENT=Cash2u.ca offers online payday loans and cash advance for Canadians">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript" src="./css/usernamecheck.js">
</script>
<script src="./css/jquery.maskedinput.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="./css/main_style.css"/>
<link rel="stylesheet" type="text/css" href="./css/index.css"/>
<script type="text/javascript" src="validationjava.js"></script>
<script src="formavalidates.js" type="text/javascript"></script>
<style type="text/css">@import "/css/jquery.datepick.css";</style>
<script type="text/javascript" src="/css/jquery.datepick.js"></script>
<script type="text/javascript">
function autoSubmit()
{
    var formObject = document.forms['informationmanagement'];
    formObject.submit();
}

</script>


</head>
<body>
<div id="maincontainer">

<div id="headsection">
<div id="headback">
<br/><br/><br/><h1><a style="color:white;" href="apply.php">Cash to you</a></h1><p id="headpara"><a style="color:white;" href="apply.php">Simple Easy Fast - Your payday loan</a></p>
</div>
</div>

<table cellspacing="4" cellpadding="1" border="0" style="margin:5px;height:50px;width:740px;background-color:#084c8d;border:1px solid #e5e5e5;color:white;font-size:110%;font-weight:bold;">
<tr><td width="20"></td>
<td width="90" align="center"><a class="headlink" href="NewAppliation.php">Application</a></td>
<td width="90" align="center"><a class="headlink" href="management.php">Management</a></td>
<td width="130" align="center"></td>
<td width="110" align="center"></td>
<td width="90" align="center"></td>
<td width="90" align="center"><a class="headlink" href="logout.php">Log out</a></td>
<td width="140"></td>
</tr>
</table>

<div id="content">
    	<div id="Apphead" class="Apphead" style="margin: 20px 0 0 5px;">
        	<h3>Management Process</h3>            
    	</div>
        <!-- EOD of Application Head -->    
          
        <div id="TopSectionWrapper" class="PersonalInfo">

<!---------------------------------------------------------------------------------------------->


<form name="informationmanagement" method="post">
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
<tr><td width="700" align="center">Please Select Management Item</td></tr>
<tr><td width="700" align="center">    
    <select style="width: 220px;" name="mstatus" onChange="autoSubmit();">
	<option value="null">Please select management item</option>
	<option value="1" <?php if($status == 1) echo " selected"; ?>>Update Promotion Coupon</option>
	<option value="2" <?php if($status == 2) echo " selected"; ?>>Create Employee LoginID</option>
        <option value="3" <?php if($status == 3) echo " selected"; ?>>Send Email</option>
        <option value="4" <?php if($status == 4) echo " selected"; ?>>Update Province Cost</option>
    </select></td></tr>

<!--The following part is used to populate current promotion Coupon-->
    <?php if($status != null && is_numeric($status) && $status==1)  { ?>
        <?php        
        //POPULATE Current Coupon Rate from Database
        $sql = "SELECT * FROM Promotion WHERE PID=$status";
        $Rates = mysql_query($sql,$conn);  
	$row = mysql_fetch_array($Rates);
	$CCoup=$row['Rate'];
	$PID=$row['PID'];
	?>
    <tr><td width="700" align="center">Current Promotion Coupon Rate</td></tr>
    <tr><td width="700" align="center"><input type="text" style="width: 150px;" readonly value="<?php echo $CCoup;?>"></td>  
	</td></tr>
    <?php    }    ?>
<!--The above part is used to populate current promotion Coupon-->

<!--The following part is used to populate current provincial cost-->
    <?php if($status != null && is_numeric($status) && $status==4)  { ?>
	<tr></tr><tr></tr>
	<tr><td width="700" align="center">Please Select Province</td></tr>
	<tr><td width="700" align="center">
<select style="width: 220px;" name="provinceID" onChange="autoSubmit();">        
        <option value="null">Please select province</option>
        <?php        
        //POPULATE Current Coupon Rate from Database
        $sql = "SELECT * FROM ProvinceRates ORDER BY Province";
        $pcost = mysql_query($sql,$conn);  	
	while($row = mysql_fetch_array($pcost)) {        
            echo ("<option value=\"$row[PID]\" " . ($provinceID == $row["PID"] ? " selected" : "") . ">$row[Province]			</option>");  }  ?>	
</select></td></tr><tr></tr><tr></tr>   	
<tr><td width="700" align="center">Maximum Allowed Cost</td></tr>
<?php if($provinceID != null) { ?>
	<tr><td width="700" align="center">
	<?php        
        //POPULATE Selected PRovince Cost
        $sql = "SELECT * FROM ProvinceRates WHERE PID=$provinceID";
        $pcost = mysql_query($sql,$conn);  	
	$row = mysql_fetch_array($pcost);
	$MCost=$row['Rates'];  ?>
	<input type="text" style="width: 150px;" readonly value="<?php echo $MCost;?>"></td></tr> 
<?php } ?>

    <?php    }    ?>
<!--The above part is used to populate current provincial cost-->

</table>
</form>

<form name="manageupdate" method="post" action="udpatemanagementinfor.php" target="_blank">

<!--The following part is used to update new coupon rate-->

<?php	if($status == 1)  { ?>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
<tr><td width="700" align="center">Proposed Coupon Rate</td></tr>
<tr><td width="700" align="center">
<select style="width: 220px;" name="rate">
	<option value="null">Please select coupon rate</option>
	<option value="1" >1</option>
	<option value="0.95" >0.95</option>
        <option value="0.90" >0.90</option>
        <option value="0.85" >0.85</option>
        <option value="0.80" >0.80</option>
        <option value="0.75" >0.75</option>
        <option value="0.70" >0.70</option>
        <option value="0.65" >0.65</option>
        <option value="0.60" >0.60</option>
        <option value="0.55" >0.55</option>
        <option value="0.50" >0.50</option>
</select></td></tr><tr><td><input type="text" style="visibility:hidden;" name="m_status" value="<?php echo $status;?>"></td></tr>

<tr><td width="700" align="center"><input type="submit" value=" &nbsp;Submit &nbsp; "/></td></tr>
</table>	
<?php   }    ?>
<!--The above part is used to update new coupon rate-->

<!--The following part is used to create new loginID-->
<?php	if($status == 2)  { ?>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
<tr><td width="700" align="center">Please Create Employee LoginID</br><span style="color:green;font-size:small;">At least four characters/digits</span></td></tr>
<tr><td width="700" align="center">
<input name="loginID" id="loginID" type="text" />
<img id="available" src="./images/available.png" width="16" height="16"/>
<img id="notavailable" src="./images/notavailable.png" width="16" height="16"/></td></tr><tr></tr>

<tr><td width="700" align="center">Please Select Employee Role</td></tr>
<tr><td width="700" align="center">
<select style="width: 220px;" name="roles">
	<option value="null">Please select roles</option>
	<option value="admin" >Admin</option>
	<option value="employee" >Employee</option>
</select></td></tr><tr></tr>
<tr><td><input type="text" style="visibility:hidden;" name="m_status" value="<?php echo $status;?>"></td></tr>

<tr><td width="700" align="center"><input type="submit" value=" &nbsp;Submit &nbsp; "/></td></tr>
</table>	
<?php   }    ?>
<!--The above part is used to create new employee loginID-->

<!--The following part is to process feedback to contact-->
<?php	if($status == 3)  { ?>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
	<tr>
	<td width="210" align="right"></td>
	<td width="410" align="left">Separate emails by comma</td>
	</tr>
	<tr>
	<td width="210" align="right">TO:</td>
        <td width="410"><input type="text" style="width: 180px;" value="" name="TOS"></td>
	</tr>
	<tr>
        <td width="210" align="right">CC:</td>
        <td width="410"><input type="text" style="width: 180px;" name="CCS" value=""></td>
	</tr>
	<tr>
        <td width="210" align="right">BCC:</td>
        <td width="410"><input type="text" style="width: 180px;" name="BCCS" value=""></td>
	</tr>	
	<tr>
        <td width="210" align="right">SUBJECT:</td>
        <td width="410"><input type="text" style="width: 180px;" name="SUBJECT" value=""></td>
	</tr>	
	<tr>
        <td width="210" align="right">FROM:</td>
        <td width="410">
		<select style="width: 220px;" name="FROM">
			<option value="null">Please select email</option>
			<option value="adam.wang@cash2u.ca" >adam.wang@cash2u.ca</option>
			<option value="amandalbl@cash2u.ca" >amandalbl@cash2u.ca</option>
			<option value="amandalbl@yahoo.com" >amandalbl@yahoo.com</option>
			<option value="careers@cash2u.ca" >careers@cash2u.ca</option>
			<option value="customerservices@cash2u.ca" >customerservices@cash2u.ca</option>
			<option value="customerservicessupport@cash2u.ca" >customerservicessupport@cash2u.ca</option>
			<option value="loanapplication@cash2u.ca" >loanapplication@cash2u.ca</option>
		</select>
	</td>
	</tr>	
	<tr>
	<td width="210" align="right">Contents</td>
        <td width="410"><textarea rows="5" cols="50" name="contents"></textarea></td>
	</tr>
	<tr>
	<td width="210" align="right"></td>
        <td width="410"><input type="submit" value=" &nbsp;Submit &nbsp; "/></td>
	</tr>
<tr><td><input type="text" style="visibility:hidden;" name="m_status" value="<?php echo $status;?>"></td></tr>
</table>
<?php   }    ?>	

<!--The above part is to process feedback to contact-->

<!--The following part is used to update Provincial Cost-->

<?php	if($status == 4)  { ?>
<table cellspacing="4" cellpadding="1" border="0" style="margin: 0 0 0 0;">
<tr><td width="700" align="center">New Maximum Allowed Cost</td></tr>
<tr><td width="700" align="center"><input type="text" name="mcost" style="width: 150px;">
</td></tr><tr><td><input type="text" style="visibility:hidden;" name="m_status" value="<?php echo $status;?>"></td></tr>
<tr><td><input type="text" style="visibility:hidden;" name="m_pid" value="<?php echo $provinceID;?>"></td></tr>
<tr><td width="700" align="center"><input type="submit" value=" &nbsp;Submit &nbsp; "/></td></tr>
</table>	
<?php   }    ?>
<!--The above part is used to update Provincial Cost-->

</form>


<div id="footer">
<div id="imlinks"><b><strong>Copyright &#169 2011 Cash2u.ca All rights reserved</strong></b></div>
</div>

</div>

</body>
</html>













































































































